package pl.krzosekm.vehicleregister.model;
// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;




/**
 * User entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="user")
@GenericGenerator(name="generator", strategy="increment")
public class User extends PersistentObject {


    // Fields    
    private static final long serialVersionUID = -5818239463212292787L;

    @Id
    @GeneratedValue(generator="generator")
    @Column(name="id", unique=true, nullable=false)
    private Integer id;
    
    @Column(name="login", nullable=false)
    private String login;
    
    @Column(name="first_name", nullable=false)
    private String firstName;
    
    @Column(name="surname", nullable=true)
    private String surname;

    // Constructors
    /** default constructor */
    public User() {
    }
    
    public User(String login, String firstName, String surname) {
		super();
		this.login = login;
		this.firstName = firstName;
		this.surname = surname;
	}
    
    public User(Integer id, String firstName, String surname) {
		super();
		this.id = id;
		this.firstName = firstName;
		this.surname = surname;
	}
    
    
    
    // Getters and setters

    	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public void setLogin(String login) {
	    this.login = login;
	}

	public String getLogin() {
	    return login;
	}

	



}